The invention relates to a method for compressing an analog signal, for example a voice signal, the signal function being continuously sampled, quantized and encoded into data words and the difference between each two successive data words being formed, then each difference value being quantized and encoded.
Known methods of this type, which are used for example for voice compression and voice coding in transmission systems, achieve an improvement in the transmission quality by increasing the compression rates, as a result of which, however, the requisite implementation outlay increases. The methods used in telecommunications are standardized as CCITT and ITU standards. In this case, the A-law and U-law coding for the PCM telephony standard at 64 kbit/s represents the reference transmission quality. The standards G722, G726 for ADPCM at 32 kbit/s and G728 for LD-CELP at 16 kbit/s achieve good transmission quality, while the quality of the G730 standard for GSM at 13 kbit/s can only be classified as not as good.
The improvements to the existing compression methods that have been disclosed in various documents relate to an increase in the compression factor whilst retaining the quality, a reduction in the transmission errors whilst retaining the compression factor, or the transmission of additional information in the voice data stream. The disadvantage of this prior art is that the improvement in the voice quality is achieved by an additional outlay on hardware and/or a more complex program, which requires a faster signal processor.
SU-Patent 1107308 describes a data transmission system with error prediction signal compression based on a DPCM (delta modulation) method, the voice signal being filtered and converted in order to calculate therefrom linear prediction coefficients and the prediction error energy. The linear prediction signals are entered into a distortion computer which also receives code words for the most probable combinations of linear prediction coefficients from a ROM. The code word index corresponding to the minimum distortion is encoded for the multiplexer. However, this method presupposes a correspondingly high computer power.
Furthermore, known compression methods are also used in voice storage systems. In order to reduce the storage capacity of a voice mail system, voice data are compressed using various encoding algorithms (ADPCM, GSM, LD-CELP etc.). These compression methods offer a low encoding delay in association with low storage data rates. However, a primary disadvantage here is the high processor power requirement for the algorithms, with the result that the number of simultaneously available voice channels is limited.
An object of the invention, therefore, is to reduce the computer power required for a method of the type mentioned in the introduction.
A further object is to specify a method which enables the number of transmission voice channels to be increased whilst retaining the transmission quality and the computer power.
According to the invention, this is achieved by the fact that, from the data word stream, a predeterminable number of encoded data words are continuously stored as group and each group is successively processed in accordance with steps a) to f):
a) the difference between each two successive data words is calculated in a computation operation that is repeated for each data word of the group,
b) the maximum value of the difference values of a group is determined and assigned a low-order scaling factor,
steps c) to f) are executed in a computation operation that is repeated for each data word of the group, in which case
c) a corrected difference value between successive data words of the group is formed by subtracting a respective data word from the data word determined in the preceding computation step, the result is respectively scaled using a scaling function dependent on the scaling factor, is quantized and encoded to form a low-order delta value, which delta value is then processed further, if appropriate stored, with the other delta values calculated in this way and the scaling factor of the group,
d) the respective delta value is decoded again and descaled with reference to the associated scaling factor using the corresponding inverse scaling function,
e) each descaled difference value is respectively added to the data word determined in the preceding computation step and
f) the data word calculated in this way is used as data word of the preceding computation step in the succeeding computation step c) and e).
Using this method according to the invention makes it possible to dispense with complex calculations such as in the case of ADPCM, for example, and to replace them by simple computation operations such as addition and subtraction. The otherwise customary prediction algorithms are replaced by the analysis of current data, thereby affording high accuracy. The time delay that has to be accepted in the process is of no importance in voice storage applications, for instance. Furthermore, it is also possible to use signal-adapted quantization levels by, for instance, performing smaller quantization gradation for the low-frequency signal components, which are more prevalent in voice signals.
Essentially, it is possible to reduce the necessary computation power for compression, with the result that this method according to the invention is particularly suitable for digital voice memories.
In the method according to the invention, the signal is immediately decoded again after encoding in order also to compensate for possible deviations with the next quantization operation.
A further object of the invention is to specify a method of the type mentioned in the introduction for slowly changing analog signals which enables the information to be compressed with the same computer power, without a noticeable time delay occurring.
According to the invention, this is achieved by the fact that the characterizing features of patent claim 1 are executed with the difference that step b1) is carried out instead of step b), comprising:
b1) the maximum value of the difference values of the preceding group is used for the assignment of a low-order scaling factor for the current group.
As a result, the scaling factor calculated for a preceding group is in each case used immediately as scaling factor for the current group so that it is not necessary firstly to wait for the calculation of the scaling factor in order to carry out scaling of the difference values. In this way, it is possible to prevent a time delay; a prerequisite for such an application of the respectively preceding scaling factor is a signal that does not change abruptly. This condition is usually fulfilled for a normal call tone.
In accordance with another variant of the invention, it may be provided that the scaling function is formed by division and the descaling function by multiplication by the scaling factor, the division being carried out by n and the multiplication by n by means of n-fold bit-by-bit shifting to the right and left respectively.
These shift operations are particularly simple to process and therefore demand only very little computation power.
A further feature of the invention may consist in the scaling function being formed by power formation to base 2.
This makes it possible to achieve a high computation speed since these computation operations can be carried out by simple bit shifting.
This correspondingly diminishes the influence of very large scaling factors.
In accordance with another variant of the invention, it may be provided that, for compression, for each scaled difference value a quantization level assigned to this value is read from a quantization table and, for decompression, a decoded value is assigned to each encoded value by means of a decoding table.
Complex computation operations can be obviated by using tables.
Furthermore, a feature of the invention may consist in the levels of the quantization table and of the decoding table being chosen essentially to correspond to the levels of a histogram of a loud speech item.
This has a particularly advantageous effect on the voice quality since prescaling means that all the signal elements tend to become loud signals.
In accordance with another variant of the invention, it may be provided that in step b) the maximum value of the difference values is assigned a scaling factor from a scaling table.
Complicated computation operations can be obviated by using a scaling table. The scaling table can be adapted to the respective requirements.
In a further design of the invention, it may be provided that the scaling factor is assigned such that the largest available quantization step reaches 80% of the largest difference value.
This is advantageous in the case of coarse gradation with large delta values since otherwise overshooting as a result of missing intermediate values can easily occur. This would lead to acoustically unpleasant odd harmonics.
A signal that has been compressed according to the invention is decompressed by application of steps d), e) and f).